﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EfCore.Configers
{
    public class EAConfigers : IEntityTypeConfiguration<EA>
    {
        public void Configure(EntityTypeBuilder<EA> builder)
        {
            builder.ToTable("EA"); // 设置表名
            builder.HasKey(e => e.AnsId); // 设置主键HumanIdcard
            builder.Property(e => e.AnsId).HasColumnName("AnsId").ValueGeneratedOnAdd(); // 设置自增列
            builder.Property(e => e.AnswerNumber).HasColumnName("AnswerNumber"); // 设置答案编号列
            builder.Property(e => e.ExamNumber).HasColumnName("ExamNumber"); // 设置试卷编号列
            builder.Property(e => e.ResumeId).HasColumnName("ResumeId"); // 设置简历编号列
            builder.Property(e => e.InterviewIid).HasColumnName("InterviewIid"); // 设置面试编号列
            builder.Property(e => e.HumanName).HasColumnName("HumanName"); // 设置姓名列
            builder.Property(e => e.HumanIdcard).HasColumnName("HumanIdcard"); // 设置身份证号列
            builder.Property(e => e.MajorKindId).HasColumnName("MajorKindId"); // 设置职位分类编号列
            builder.Property(e => e.MajorKindName).HasColumnName("MajorKindName"); // 设置职位分类名称列
            builder.Property(e => e.MajorId).HasColumnName("MajorId"); // 设置职位编号列
            builder.Property(e => e.MajorName).HasColumnName("MajorName"); // 设置职位名称列
            builder.Property(e => e.TestTime).HasColumnName("TestTime"); // 设置测试时间列
            builder.Property(e => e.UseTime).HasColumnName("UseTime"); // 设置使用时间列
            builder.Property(e => e.TotalPoint).HasColumnName("TotalPoint"); // 设置总分列
                                                                             // 设置其他属性的配置...
        }
    }
}
